home *** CD-ROM | disk | FTP | other *** search
-
-
- Instructions for installing the INGRES lock device in UNIX
-
- May 19, 1983
-
-
-
- INGRES version 8.1 has a fully implemented concurrency control
- mechanism. The INGRES system sets and clears locks by writing to
- a server named "ingreslock". If the socket cannot be opened for
- writing, INGRES runs without any concurrency control.
-
- Initially it is advisable to bring up INGRES without the con-
- currency device. If planned usage of the INGRES system requires
- concurrency control then the server "ingreslock" must be in-
- stalled into your UNIX system.
-
- This document describes the procedure for installing the UNIX
- server for "ingreslock".
-
-
- 1. Log in as root.
-
- 2. Compiling the concurrency device
-
-
- 2.1. change directory to ../source/support
-
- The concurrency device consists of three files:
- .../source/support/ildr.c
- .../source/h/ildr.h and .../source/support/init_socket.c
-
- compile the lock driver
- make ingreslock
-
-
- 2.2. Installation Parameters
-
- There are several parameters in ildr.h that can be set by
- the user. These include:
-
- NLOCKS - number of locks
- PLOCKS - page locks
- RLOCKS - relation locks
- DLOCKS - data base locks
-
- NLOCKS is the maximum number of locks permissible. It
- determines the size of the lock table. PLOCKS is the
- maximum number of page, relation and data base locks.
- RLOCKS is the maximum number of relation and data base
- locks. DLOCKS is the maximum number of data base locks.
- Only DLOCKS INGRESes can be active at one time.
-
- The following conditions must hold to protect against
- deadlock due to lock table overflow:
-
- NLOCKS > PLOCKS > RLOCKS > DLOCKS + 6
-
- The extra number of RLOCKS are required inorder to be
- able to run 6-variable queries. We recommend first set-
- ting DLOCKS and then setting the other parameters as fol-
- lows:
-
- RLOCKS = 2*DLOCKS + 6
- PLOCKS = RLOCKS + 3
- NLOCKS = PLOCKS + 1
-
- For example, to reduce the size of the lock table, one
- could set DLOCKS = 2, RLOCKS = 10, PLOCKS = 13, NLOCKS =
- 14. In this case, only 2 people could be running ingres
- at one time.
-
- As another example, to allow for more concurrent
- INGRESes, one could set DLOCKS = 20, RLOCKS = 46, PLOCKS
- = 49, NLOCKS = 50. This scenario would allow for twenty
- simultaneous INGRES users.
-
-
- 2.3. Copy the server
-
- Copy the lock server to where the servers are kept on
- your system.
-
- cp ingreslock /etc/ingreslock
-
-
- 3. Add the service to /etc/services
-
- You should have an entry
-
-
- ingreslock 1524/tcp # Ingres concurrency driver
-
-
-
- In your /etc/services file. Note that the number (in this
- case 1524) need only be unique among your servers, and does
- NOT have to be 1524 (we use it though).
-
- 4. Put lock server in /etc/rc.local thusly:
-
- /etc/ingreslock & echo -n ' ingreslock' > /dev/console
-
-
- This ensures that the lock server is always running when the
- system is up.
-
- 5. Done.
-
- INGRES will now use the "ingreslock" service for its con-
- currency control. A simple way to verify this is to try run-
- ning (for example) "purge" on a data base while anyone is
- running "ingres" on the same data base.
-
-